/******************************************************************************
 cnome: A C++ source "genes" discover. :-)

 See more details at:

   http://www.codeplex.com/cnome

 The original author site is at: http://www.alemosbarbosa.com/

 Copyright (c) 2008-2010 Alexandre Lemos Barbosa.
 Distributed under the MIT License. (See accompanying file LICENSE-MIT.txt 
 or at http://www.codeplex.com/cnome/license)
 ******************************************************************************/

#ifndef OVERLOADING_DEFINITION_H
#define OVERLOADING_DEFINITION_H

#include "actions.h"
#include "cnome.h"
#include "tokens.h"

namespace cnome {
using namespace util;
using namespace actions;

template <typename ScannerT>
void
cpp::definition<ScannerT>::overloading(cpp const& self)
    {
        operator_function_id =
            OPERATOR >> operator_
        ;

        operator_ =
            NEW | DELETE_ | NEW_S | DELETE_S | 
            PLUS | MINUS | STAR | DIVIDE | PERCENT | XOR | AND | OR | COMPL | NOT | ASSIGN | LESS | GREATER | 
            PLUSASSIGN | MINUSASSIGN | STARASSIGN | DIVIDEASSIGN | PERCENTASSIGN | XORASSIGN | ANDASSIGN | ORASSIGN | SHIFTLEFT | SHIFTRIGHT | SHIFTLEFTASSIGN | SHIFTRIGHTASSIGN | EQUAL |
            NOTEQUAL | LESSEQUAL | GREATEREQUAL | ANDAND | OROR | PLUSPLUS | MINUSMINUS | COMMA | ARROWSTAR | ARROW | PARENS | BRACKETS
        ;
        //  End grammar definition
         
        // turn on the debugging info.
        BOOST_SPIRIT_DEBUG_RULE(operator_function_id);
        BOOST_SPIRIT_DEBUG_RULE(operator_);

        BOOST_SPIRIT_DEBUG_RULE(OPERATOR);
        BOOST_SPIRIT_DEBUG_RULE(NEW);
        BOOST_SPIRIT_DEBUG_RULE(DELETE_);
        BOOST_SPIRIT_DEBUG_RULE(NEW_S);
        BOOST_SPIRIT_DEBUG_RULE(DELETE_S);
        BOOST_SPIRIT_DEBUG_RULE(PLUS);
        BOOST_SPIRIT_DEBUG_RULE(MINUS);
        BOOST_SPIRIT_DEBUG_RULE(STAR);
        BOOST_SPIRIT_DEBUG_RULE(DIVIDE); 
        BOOST_SPIRIT_DEBUG_RULE(PERCENT);
        BOOST_SPIRIT_DEBUG_RULE(XOR);
        BOOST_SPIRIT_DEBUG_RULE(AND);
        BOOST_SPIRIT_DEBUG_RULE(OR);
        BOOST_SPIRIT_DEBUG_RULE(COMPL);
        BOOST_SPIRIT_DEBUG_RULE(NOT);
        BOOST_SPIRIT_DEBUG_RULE(ASSIGN);
        BOOST_SPIRIT_DEBUG_RULE(LESS);
        BOOST_SPIRIT_DEBUG_RULE(GREATER); 
        BOOST_SPIRIT_DEBUG_RULE(PLUSASSIGN);
        BOOST_SPIRIT_DEBUG_RULE(MINUSASSIGN);
        BOOST_SPIRIT_DEBUG_RULE(STARASSIGN);
        BOOST_SPIRIT_DEBUG_RULE(DIVIDEASSIGN); 
        BOOST_SPIRIT_DEBUG_RULE(PERCENTASSIGN);
        BOOST_SPIRIT_DEBUG_RULE(XORASSIGN);
        BOOST_SPIRIT_DEBUG_RULE(ANDASSIGN);
        BOOST_SPIRIT_DEBUG_RULE(ORASSIGN);
        BOOST_SPIRIT_DEBUG_RULE(SHIFTLEFT); 
        BOOST_SPIRIT_DEBUG_RULE(SHIFTRIGHT);
        BOOST_SPIRIT_DEBUG_RULE(SHIFTLEFTASSIGN);
        BOOST_SPIRIT_DEBUG_RULE(SHIFTRIGHTASSIGN);
        BOOST_SPIRIT_DEBUG_RULE(EQUAL);
        BOOST_SPIRIT_DEBUG_RULE(NOTEQUAL);
        BOOST_SPIRIT_DEBUG_RULE(LESSEQUAL);
        BOOST_SPIRIT_DEBUG_RULE(GREATEREQUAL);
        BOOST_SPIRIT_DEBUG_RULE(ANDAND);
        BOOST_SPIRIT_DEBUG_RULE(OROR);
        BOOST_SPIRIT_DEBUG_RULE(PLUSPLUS);
        BOOST_SPIRIT_DEBUG_RULE(MINUSMINUS);
        BOOST_SPIRIT_DEBUG_RULE(COMMA);
        BOOST_SPIRIT_DEBUG_RULE(ARROWSTAR);
        BOOST_SPIRIT_DEBUG_RULE(ARROW);
        BOOST_SPIRIT_DEBUG_RULE(PARENS);
        BOOST_SPIRIT_DEBUG_RULE(BRACKETS);
        BOOST_SPIRIT_DEBUG_RULE(EPSILON);
    }
}  // namespace cnome

#endif // OVERLOADING_DEFINITION_H
